import request from "@/utils/request";
// 获取学科信息列表

export const getSubjectListApi = (params) => {
  return request({
    url: "/subject/subject",
    method: "get",
    params,
  });
};
// 创建学科
export const addSubjectApi = (data) => {
  return request({
    url: "/subject/subject",
    method: "post",
    data,
  });
};
// 回显
export const showSubjectApi = (params) => {
  return request({
    url: "/subject/subject/" + params,
    method: "get",
  });
};
// 修改
export const editSubjectApi = (data) => {
  return request({
    url: "/subject/subject/" + data.id,
    method: "put",
    data,
  });
};
// 删除
export const deleteSubjectApi = (id) => {
  return request({
    url: "/subject/subject/" + id,
    method: "delete",
  });
};
